<?php

namespace iBrand\Component\Discount\Checkers;

use iBrand\Component\Discount\Contracts\DiscountContract;
use iBrand\Component\Discount\Contracts\DiscountSubjectContract;
use iBrand\Component\Discount\Contracts\RuleCheckerContract;

class CartQuantityRuleChecker implements RuleCheckerContract
{
    const TYPE = 'cart_quantity';
    
    public function isEligible(DiscountSubjectContract $subject, array $configuration,DiscountContract $discount)
    {
        return $subject->getSubjectCount() >= $configuration['count'];
    }
}